package EvaTCPL;

public class EvaTCPLaexpression
{
  EvaTCPLaexpression sons[] = null;

  public EvaTCPLaexpression()
    {
    }

  public EvaTCPLaexpression(Object o)
    {
    }

  public EvaTCPLaexpression(EvaTCPLaexpression son1)
    {
      sons = new EvaTCPLaexpression[1];
      sons[0] = son1;
    }

  public EvaTCPLaexpression(EvaTCPLaexpression son1, EvaTCPLaexpression son2)
    {
      sons = new EvaTCPLaexpression[2];
      sons[0] = son1;
      sons[1] = son2;
    }

  public EvaTCPLaexpression(EvaTCPLaexpression son1, EvaTCPLaexpression son2, EvaTCPLaexpression son3)
    {
      sons = new EvaTCPLaexpression[3];
      sons[0] = son1;
      sons[1] = son2;
      sons[2] = son3;
    }

  public EvaTCPLaexpression(EvaTCPLaexpression[] thesons)
    {
      sons = thesons;
    }

  /** Evaluate this arithmetic expression. */
  public double evaluate()
    {
      return 0;
    }

  /** Evaluate this arithmetic expression as an integer. */
  public int evaluateint()
    {
      return 0;
    }

  /** Convert expression to a string. */
  public String toString()
    {
      return "";
    }

  /** Initialize the expression. This will call initilize() on each of 
      the sons and then initialize_inner()
  */
  public void initialize(EvaTCPLProblem theproblem)
    {
      if (sons!=null) {
	for (int i=0;i<sons.length;i++) {
	  sons[i].initialize(theproblem);
	}
      }
      initialize_inner(theproblem);
    }
  
  public void initialize_inner(EvaTCPLProblem theproblem)
    {
      
    }

  /** Accept a visitor. */
  public void visitorAccept(EvaTCPLaexprVisitor avisitor)
    {

      if (this instanceof EvaTCPLabs) {
	avisitor.visitEvaTCPLabs(this);
      }
      else if (this instanceof EvaTCPLacos) {
	avisitor.visitEvaTCPLacos(this);
      }
      else if (this instanceof EvaTCPLasin) {
	avisitor.visitEvaTCPLasin(this);
      }
      else if (this instanceof EvaTCPLatan) {
	avisitor.visitEvaTCPLatan(this);
      }
      else if (this instanceof EvaTCPLceil) {
	avisitor.visitEvaTCPLceil(this);
      }
      else if (this instanceof EvaTCPLcos) {
	avisitor.visitEvaTCPLcos(this);
      }
      else if (this instanceof EvaTCPLdiv) {
	avisitor.visitEvaTCPLdiv(this);
      }
      else if (this instanceof EvaTCPLdoublevalue) {
	avisitor.visitEvaTCPLdoublevalue(this);
      }
      else if (this instanceof EvaTCPLdrift) {
	avisitor.visitEvaTCPLdrift(this);
      }
      else if (this instanceof EvaTCPLe) {
	avisitor.visitEvaTCPLe(this);
      }
      else if (this instanceof EvaTCPLedist) {
	avisitor.visitEvaTCPLedist(this);
      }
      else if (this instanceof EvaTCPLexp) {
	avisitor.visitEvaTCPLexp(this);
      }
      else if (this instanceof EvaTCPLfloor) {
	avisitor.visitEvaTCPLfloor(this);
      }
      else if (this instanceof EvaTCPLgdist) {
	avisitor.visitEvaTCPLgdist(this);
      }
      else if (this instanceof EvaTCPLif) {
	avisitor.visitEvaTCPLif(this);
      }
      else if (this instanceof EvaTCPLintvalue) {
	avisitor.visitEvaTCPLintvalue(this);
      }
      else if (this instanceof EvaTCPLlog) {
	avisitor.visitEvaTCPLlog(this);
      }
      else if (this instanceof EvaTCPLmax) {
	avisitor.visitEvaTCPLmax(this);
      }
      else if (this instanceof EvaTCPLmin) {
	avisitor.visitEvaTCPLmin(this);
      }
      else if (this instanceof EvaTCPLminus) {
	avisitor.visitEvaTCPLminus(this);
      }
      else if (this instanceof EvaTCPLmod) {
	avisitor.visitEvaTCPLmod(this);
      }
      else if (this instanceof EvaTCPLmul) {
	avisitor.visitEvaTCPLmul(this);
      }
      else if (this instanceof EvaTCPLndist) {
	avisitor.visitEvaTCPLndist(this);
      }
      else if (this instanceof EvaTCPLperiod) {
	avisitor.visitEvaTCPLperiod(this);
      }
      else if (this instanceof EvaTCPLpi) {
	avisitor.visitEvaTCPLpi(this);
      }
      else if (this instanceof EvaTCPLplus) {
	avisitor.visitEvaTCPLplus(this);
      }
      else if (this instanceof EvaTCPLpow) {
	avisitor.visitEvaTCPLpow(this);
      }
      else if (this instanceof EvaTCPLrndint) {
	avisitor.visitEvaTCPLrndint(this);
      }
      else if (this instanceof EvaTCPLround) {
	avisitor.visitEvaTCPLround(this);
      }
      else if (this instanceof EvaTCPLsgn) {
	avisitor.visitEvaTCPLsgn(this);
      }
      else if (this instanceof EvaTCPLsin) {
	avisitor.visitEvaTCPLsin(this);
      }
      else if (this instanceof EvaTCPLsqrt) {
	avisitor.visitEvaTCPLsqrt(this);
      }
      else if (this instanceof EvaTCPLstoch) {
	avisitor.visitEvaTCPLstoch(this);
      }
      else if (this instanceof EvaTCPLtan) {
	avisitor.visitEvaTCPLtan(this);
      }
      else if (this instanceof EvaTCPLthis) {
	avisitor.visitEvaTCPLthis(this);
      }
      else if (this instanceof EvaTCPLtime) {
	avisitor.visitEvaTCPLtime(this);
      }
      else if (this instanceof EvaTCPLudist) {
	avisitor.visitEvaTCPLudist(this);
      }
      else if (this instanceof EvaTCPLvarvalue) {
	avisitor.visitEvaTCPLvarvalue(this);
      }
    }
  
}
